<script lang="ts" setup>
import { ref } from "vue"
import category from "./components/category.vue"
import searchTable from "./components/searchTable.vue"

const props = defineProps({
    row: {
        type: Object,
        default: () => {}
    }
})
const dialogVisible = ref(false);
const materialName = ref('');

const initData = () => {
//   setWarehousePagelist(
//     Object.assign(
//       {
//         id: props.id
//       }
//     )
//   ).then(res => {
//     tableData.value = res.data.records;
//   });
}

const handleSave = () => {
}

const handleCancel = () => {
    dialogVisible.value = false;
}

defineExpose({
    open: () => {
        dialogVisible.value = true;
    }
})
</script>
<template>
    <el-dialog class="addMaterial" v-model="dialogVisible" title="编辑" width="1116" :close-on-click-modal="false" :close-on-press-escape="false">
        <div class="flex flex-row pl-[32px] pr-[32px] pt-[24px]">
            <category />
            <div class="h-[100%] w-[1px] bg-[#EEEEEE] mr-[16px] ml-[16px]"></div>
            <searchTable />
        </div>
        <template #footer>
            <div class="flex flex-row justify-end pt-[24px] pr-[16px] pl-[16px]">
                <el-button type="primary" @click="handleSave">确认</el-button>
                <el-button @click="handleCancel">取消</el-button>
            </div>
        </template>
    </el-dialog>
</template>